import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import resize from '@/utils/resize'
import {
    throttle
} from '@/utils/utils'
import axios from 'axios'
import './assets/style/reset.css'
import './assets/style/public.css'
import * as echarts from 'echarts'
import 'echarts-wordcloud';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import databox from "./components/databox.vue"
import title from "./components/title.vue"
import box from "./components/box.vue"
import marquee from "./components/marquee.vue"
import chinaMap from '@/assets/china.json'
// 接口请求超时时间 五秒 根据实际情况自定义
axios.defaults.timeout = 5000
echarts.registerMap("china", {
    geoJSON: chinaMap
})
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
Vue.prototype.$axios = axios
Vue.use(ElementUI);
Vue.component('databox', databox)
Vue.component('my-title', title)
Vue.component('my-marquee', marquee)
Vue.component('box', box)
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
const resizeFunc = resize(1920, 1080, 'app', 1)
resizeFunc()
window.onresize = throttle(resizeFunc)